using System;
using System.Threading;
using Glider.Common.Objects;
using System.Reflection;

//!Reference: AdvancedMap.dll

using AdvancedMap;

namespace Glider.Common.Objects
{
    public class MapLoader : GGameClass
    {
	AdvancedMap.Map newMap;
        public override string DisplayName
        {
            get { return "MapLoader"; }
        }

        public override void Startup()
        {
            try
            {
                 newMap = new AdvancedMap.Map();
                 newMap.RunMap();
            }
            catch
            {
                Context.Log("Error in OnStartGlide");
            }
        }

        public override void Shutdown()
        {
            try
            {
                newMap.StopMap();
            }
            catch
            {
                Context.Log("Error in OnStopGlide");
            }
        }

        /*public override void Patrol()
        {
            OnStartGlide();
            Thread.Sleep(0);
        }*/
    }
}